<?php
//
// +------------------------------------------------------------------------+
// | Gecko Framework                                                        |
// +------------------------------------------------------------------------+
//
require_once("Gecko/Form/Exception.php");
require_once("Gecko/Form/Field.php");

/**
 * Hidden Field control
 *
 * @package Gecko.Form.Field;
 * @author Christopher Valderrama <valderrama.christopher@gmail.com>
 * @copyright Copyright (c) 2008
 * @version $Id$v1.0$ 2008
 * @access public
 **/
class Gecko_Form_Field_Hidden extends Gecko_Form_Field {
	/**
	 * Field type
	 *
	 * @var string
	 */
	protected $type = 'hidden';

	/**
	 * Returns the built control HTML
	 *
	 * @return string
	 */
	public function getControl() {
		$value = $this->getValue();
		$name = $this->getName();
		$vars = array();
		$template = Gecko_Router::LIBRARY_DIR . "/Assets/Form/Templates/Hidden.php";

		$vars['name'] = $name;
		$vars['value'] = $value;

		$html = Gecko_Template::renderTemplate( $template, $vars, true );
		return $html;
	}
}
